<template>
	<view :style="themeColor">
		<view class="page">
			<view class="flex benben-position-layout flex flex-wrap align-center shopList_flex_0"
				:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }" v-if=" appSystemIdentification!='Wechat'">
				<view class='flex flex-wrap align-center justify-between flex-sub shopList_fd0_0'>
					<view class='flex flex-wrap align-center shopList_fd0_0_c0' @tap.stop="handleJumpDiy"
						data-type="back" data-url="1">
						<text class='fu-iconfont2  shopList_fd0_0_c0_c0'>&#xe794;</text>
					</view>
					<text class='shopList_fd0_0_c1'>店铺服务列表</text>
					<view class='flex flex-wrap align-center shopList_fd0_0_c0'>
					</view>
				</view>

			</view>
			<view :style="{height: (88+StatusBarRpx)+'rpx'}" v-if=" appSystemIdentification!='Wechat'"></view>
			<!---flex布局flex布局开始-->
			<view class="flex benben-flex-layout flex-wrap align-center shopList_flex_1">
				<template v-for='(item,key0) in serviceList'>
					<view class='flex flex-direction flex-wrap align-stretch shopList_fd1_0' @tap.stop="handleJumpDiy"
						data-type="navigateTo"
						:data-url="`/pages/index/serviceDetails/serviceDetails?id=${item.aid}&serviceName=${item.service_title}`"
						:key='key0'>
						<view class='flex flex-wrap align-center'>
							<image class='shopList_fd1_0_c0_c0' mode="aspectFill" :src='item.picture'></image>
						</view>
						<text class='flex-sub shopList_fd1_0_c1'>{{item.service_title}}</text>
						<view class='flex flex-direction flex-wrap align-stretch shopList_fd1_0_c2'>
							<view class='flex flex-wrap align-center'>
								<text class='shopList_fd1_0_c2_c0_c0'>￥</text>
								<text class=' shopList_fd1_0_c2_c0_c1'>
									<text>{{ item.deposit_money | frontPrice }}</text>
									<text>{{ item.deposit_money | laterPrice }}</text>
								</text>
								<text class='shopList_fd1_0_c2_c0_c2'>{{item.unit_name}}</text>
							</view>
							<view class='flex flex-wrap align-center shopList_fd1_0_c2_c1'>
								<text class='shopList_fd1_0_c2_c1_c0'>{{item.scribe_money}}</text>
								<text class='shopList_fd1_0_c2_c1_c1'>销量</text>
								<text class='shopList_fd1_0_c2_c1_c2'>{{item.sales_volume}}</text>
							</view>
						</view>
						<button class='shopList_fd1_0_c3'>{{item.server_type_name}}</button>
					</view>
				</template>
				<fu-empty :pagingListLoadedAll="pagingListLoadedAll" :pagingListNoListData="pagingListNoListData"
					:listDataLength="listDataLength" :isLoadInit="isLoadInit"></fu-empty>
			</view>

			<!---flex布局flex布局结束-->


		</view>
	</view>
</template>
<script>
	import pagingList from '@/common/mixin/paging_list.js';
	import {
		validate
	} from '@/common/utils/validate.js'

	export default {
		components: {},
		mixins: [pagingList],

		data() {
			return {
				"minixPagingListsApi": "",
				"pageingListApiMethod": "",
				"allowOnloadGetList": false,
				"serviceList": [],
				"aid": ""
			};
		},
		computed: {
			themeColor() {
				return this.$store.getters.themeColor
			},
			/**
			 * @returns 
			 * Android       安卓
			 * IOS       苹果
			 * Web       H5 或 pc
			 * Wechat       微信小程序
			 * Alipay       支付宝小程序
			 * Baidu       百度小程序
			 * ByteBounce       抖音小程序
			 * 360       360小程序
			 * FastApp       快应用
			 */
			appSystemIdentification() {
				return this.$store.state.appSystemIdentification
			}
		},
		watch: {},
		onLoad(options) {
			let {
				aid
			} = options
			if (aid !== undefined) this.aid = aid
			this.getServiceFunc()
			uni.showShareMenu({
				withShareTicket: true,
				//设置下方的Menus菜单，才能够让发送给朋友与分享到朋友圈两个按钮可以点击
				menus: ["shareAppMessage", "shareTimeline"]
			})
		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {

		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {
			this.getServiceFunc()
		},
		onShareAppMessage() {
			return {
				title: '高整无忧-数字家政平台',
				path: `/pages/index/shopList/shopList?aid=${item.aid}`
			}
		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			//获取服务列表信息
			getServiceFunc() {
				this.minixPagingListsApi = global.apiUrls.post63db794652122;
				this.pageingListApiMethod = 'post';
				this.allowOnloadGetList = false;
				this.pagingListPostDataContent = {
					usermerchant_id: this.aid
				}
				this.listData = [];
				this.serviceList = this.listData;
				this.pagingListToggle();

			},
			pagingListPostData() {
				return this.pagingListPostDataContent
			}
		}
	};
</script>
<style lang="scss" scoped>
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: linear-gradient(180deg, #FFFFFF 0%, #F8F8F8 89%, #F8F8F8 100%);
		background-size: 100% auto;
	}

	.shopList_flex_0 {
		border-bottom: 1px solid #eee;
		background: #fff;
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% auto !important;
	}

	.shopList_fd0_0_c1 {
		font-size: 36rpx;
		font-weight: 500;
		color: #333;
	}

	.shopList_fd0_0_c0_c0 {
		font-size: 36rpx;
		color: #333;
	}

	.shopList_fd0_0_c0 {
		width: 120rpx;
		height: 88rpx;
	}

	.shopList_fd0_0 {
		padding: 0rpx 32rpx 0rpx 32rpx;
		height: 88rpx;
	}

	.shopList_flex_1 {
		padding: 20rpx 19rpx 0rpx 19rpx;
	}

	.shopList_fd1_0_c3 {
		background: var(--benbenbgColor2);
		border-radius: 16rpx 0rpx 16rpx 0rpx;
		line-height: 40rpx;
		font-size: 24rpx;
		color: #fff;
		position: absolute;
		top: 0rpx;
		left: 0rpx;
		padding: 0rpx 20rpx 0rpx 20rpx;
		height: 40rpx;
	}

	.shopList_fd1_0_c2_c1_c2 {
		margin: 2rpx 0rpx 0rpx 0rpx;
	}

	.shopList_fd1_0_c2_c1_c1 {
		margin: 0rpx 0rpx 0rpx auto;
	}

	.shopList_fd1_0_c2_c1_c0 {
		text-decoration: line-through;
		font-size: 24rpx;
	}

	.shopList_fd1_0_c2_c1 {
		color: rgba(146, 146, 146, 1);
		font-size: 26rpx;
		margin: 8rpx 0rpx 0rpx 0rpx;
	}

	.shopList_fd1_0_c2_c0_c2 {
		color: #FF5050;
		font-size: 24rpx;
		font-weight: 400;
		line-height: 33rpx;
	}

	.shopList_fd1_0_c2_c0_c1 {
		line-height: 50rpx;
		font-size: 36rpx;
		font-weight: 600;
		color: #E60000;
	}

	.shopList_fd1_0_c2_c0_c0 {
		color: #E60000;
		font-size: 24rpx;
		font-weight: 600;
		line-height: 45rpx;
	}

	.shopList_fd1_0_c2 {
		margin: 0rpx 16rpx 24rpx 16rpx;
	}

	.shopList_fd1_0_c1 {
		color: #333333;
		font-size: 32rpx;
		font-weight: 700;
		line-height: 45rpx;
		-webkit-line-clamp: 1;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		margin: 24rpx 16rpx 10rpx 16rpx;
	}

	.shopList_fd1_0_c0_c0 {
		width: 346rpx;
		height: 346rpx;
		border-radius: 16rpx 16rpx 0rpx 0rpx;
	}

	.shopList_fd1_0 {
		background: #fff;
		margin: 0rpx 5rpx 20rpx 5rpx;
		background-size: 100% auto !important;
		border-radius: 24rpx 24rpx 24rpx 24rpx;
		width: 346rpx;
		position: relative;
	}
</style>